package com.totoro.spring.spring_demo.property;

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.stereotype.Component;

/**
 * Created by Niki on 2018/6/14 15:25
 */
@Configuration
@PropertySource("classpath:propertyPlaceholderConfigurer.properties")
public class PropertyPlaceholderConfigurerDemo {
PropertyPlaceholderConfigurer configurer;
    @Bean
    public PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer(){
        return new PropertySourcesPlaceholderConfigurer();
    }
}
